
from app.models.UserModel import User
from app.decorators.checkMissingArgs import checkMissingArgs


class AuthService:
    def __init__(self):
        pass
    
    @checkMissingArgs()
    def loginService(self, userName, password):
        try:
            user = User.query.filter_by(username=userName, password=password).first()
            if user:
                return user
            else:
                return False
        except:
            return False

        # 登录逻辑
        pass

    def logout(self):
        # 登出逻辑
        pass

    def register(self, username, password):
        # 注册逻辑
        pass